<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>诺亚阳湖大闸蟹提货官网</title>
	<meta name="keywords" content="{$keywords}" />
	<meta name="description" content="{$description}" />
	<link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
	<load href="../Public/css/style.css" />
	<load href="../Public/css/exchange.css" />
	<load href="../Public/css/powerFloat.css" />
	<load href="../Public/css/layout.css" />
	<load href="../Public/js/jquery-1.9.1.min.js" />
	<load href="../Public/js/Validform_v5.3.2_ncr_min.js" />
	<load href="../Public/js/jquery-powerFloat-min.js" />
	<load href="../Public/js/layer.min.js" />
	<load href="../Public/js/common.js" />
</head>
<body class="bg2">
<div class="wapper">
	<div class="banner1"><h1>诺亚阳湖大闸蟹</h1><img src="../Public/images/ych_logo.jpg"></div>
	<div class="form-box2 clearfix">
		<form method="post" id="form1" name="verification" class="verification" action="{:U('Couponorder/verification')}" enctype="multipart/form-data">
			<div class="form-group">

				<input name="number" id="number" type="text" class="text" value="" autocomplete="off" datatype="*8-14" nullmsg="礼卡卡号不能为空！" errormsg="礼卡卡号格式不正确！"
					   data-form-un="1502344551750.3125">
				<div class="err-msg"></div>
			</div>
			<div class="form-group">

				<input name="password" id="password" type="password" class="text" value="" autocomplete="off" datatype="*6-10" nullmsg="礼卡密码不能为空！" errormsg="礼卡密码格式不正确！"
					   data-form-pw="1502344551750.3125">
				<div class="err-msg"></div>
			</div>
			<div class="send clearfix">
				<button type="button" class="btn-primary btn1" id="btn_sub">提 蟹</button>
				<button type="button" class="btn-primary btn2" id="btn_srh">查 询</button>
			</div>

		</form>
	</div>
	<div class="notice">
		<div class="title"></div>
		<div class="content">
			<ul class="clearfix">
				<li class="icon1">诺亚阳湖阳澄湖大闸蟹提货起始截止时间及蟹券有效期请以礼券提蟹说明上明示为准。</li>
				<li class="icon2">提交信息时请务必准确详尽，确保我们能第一时间将新鲜大闸蟹送到您手中。</li>
				<li class="icon3">大闸蟹为鲜活水产品，经过运输，产品重量如出现5%—7%误差，属正常现象。</li>
				<li class="icon4">收到大闸蟹时请第一时间开箱验收，将大闸蟹保存在冰箱保鲜层，如出现螃蟹残损，请务必通过400-100-1561客服电话或官微立即与客服联系，妥善处理。</li>

			</ul>
		</div>
	</div>
	<div id="address_area" class="t_bx hidden" >
		<form method='post' id="address" name="address" action="{:U('Couponorder/insert')}"  enctype="multipart/form-data">
		<dl>
			<dt><!-- <h1 class="f_l flw">收货信息</h1><img src="../Public/images/close.png" class="f_r" /> --></dt>
			<dd>
				<ul class="sxbx">
					<li>
						<span class="sx_lt f_l"><strong class="red">*</strong>收货人</span>
						<input name="name" type="text" class="sx_rt1 m_l2 f_l" datatype="*2-16" nullmsg="姓名不能为空！" errormsg="姓名格式不正确（2-16个汉字）！" />
					</li>

					<li>
						<span class="sx_lt f_l"><strong class="red">*</strong>手机号</span>
						<input name="mobile" type="text" class="sx_rt1 m_l2 f_l" datatype="m" nullmsg="手机号码不能为空！" errormsg="手机号码格式不正确！"/>
					</li>

					<li>
						<span class="sx_lt f_l"><strong class="red">*</strong>省</span>
						<div class="select2_bor m_l2 f_l">
							 <div class="cont2">
								<select name="province" id="province" class="tck2" onchange="loadRegion('province',2,'city','{:U('Ajax/getRegion')}');" datatype="*" nullmsg="请选择所在省份！" errormsg="请选择所在省份！">
									<option value="" selected class="defaultoption">省份/直辖市</option>
									<volist name="province" id="vo">
									<option value="{$vo.id}" >{$vo.name}</option>
									</volist>
								</select>
							</div>
						</div>
					</li>

					<li>
						<span class="sx_lt f_l"><strong class="red">*</strong>市</span>
						<div class="select2_bor m_l2 f_l">
							 <div class="cont2">
							 <select name="city" id="city" class="tck2" onchange="loadRegion('city',3,'town','{:U('Ajax/getRegion')}');" datatype="*" nullmsg="请选择所在城市！" errormsg="请选择所在城市！" >
								<option value="" class="defaultoption">市/县</option>
							 </select>
							</div>
						</div>
					</li>
					<li>
						<span class="sx_lt f_l">区</span>
						<div class="select2_bor m_l2 f_l">
							 <div class="cont2">
								<select name="town" id="town" class="tck2" >
								   <option value="" class="defaultoption">区/县/镇</option>
								</select>
							</div>
						</div>
					</li>
					<li>
						<span class="sx_lt f_l"><strong class="red">*</strong>详细地址</span>
						<textarea name="address" type="text" class="sx_rt2 m_l2 f_l" rows="8" cols="50" datatype="*2-200" nullmsg="请先写详细地址！" errormsg="详细地址格式错误！" tip="请填写尽可能详细的地址方便我们联系您！"  />请填写尽可能详细的地址方便我们联系您！</textarea>
					</li>
					<li>
						<span class="sx_lt f_l">备注信息</span>
						<textarea name="remark" type="text" class="sx_rt3 m_l2 f_l" rows="8" cols="50" /></textarea>
					</li>
					<li>
						<span class="sx_lt f_l">温馨提示</span>
						<span class="sx_rt4 m_l2 f_l red">
						同城（常州）默认发EMS,统一上午9:00发货；其他地区默认发顺丰，统一下午3:00发货；如需修改，请在备注中说明。
						</span>
					</li>
				</ul>
				<div class="t_f">
					<div class="t_container">
						<div class="t_center">
							<input type="hidden" name="password" id="hiddenpassword" value="" />
							<input type="hidden" name="number" id="hiddennumber" value="" />
							<input type="submit" class="sc_btm f_s1_8 flw m_t1_5" value="确定"  />
							<input type="submit" class="sc_btm m_l2 f_s1_8 flw m_t1_5" value="取消" onclick="layer.closeAll();return false;" />
					</div>
				</div>
			</dd>
		</dl>
		</form>
	</div>

	<div id="confirm_address_area" class="t_bx hidden" >
		<dl>
			<dt><!--h1 class="f_l flw">收货信息</h1--></dt>
			<dd>
				<ul class="sxbxs clearfix">
					<li>
						<span class="sx_lts f_l">订单号: </span><span class="sx_rts" id="ca_order_id"></span>
					</li>
					<li>
						<span class="sx_lts f_l">礼卡类型: </span><span class="sx_rts" id="ca_coupon_name"></span>
					</li>
					<li>
						<span class="sx_lts f_l">收货人: </span><span class="sx_rts" id="ca_name"></span>
					</li>
					<li>
						<span class="sx_lts f_l">手机号: </span><span class="sx_rts" id="ca_mobile"></span>
					</li>

					<li>
						<span class="sx_lts f_l">收货地址: </span>
						<span  class="sx_rts"><span id="ca_province"></span> <span id="ca_city"></span> <span id="ca_town"></span> <span id="ca_address"></span></span>
					</li>
					<li id="ca_remark_li">
						<span class="sx_lts f_l">备注信息: </span><span class="sx_rts" id="ca_remark"></span>
					</li>
					<li id="ca_userremark_li">
						<span class="sx_lts f_l">商家回复: </span><span class="sx_rts" id="ca_userremark"></span>
					</li>
					<li>
						<span class="sx_lts f_l">下单时间: </span><span class="sx_rts" id="ca_create_time"></span>
					</li>
					<li>
						<span class="sx_lts f_l">订单状态: </span><span class="sx_rts" id="ca_status_name"></span>
					</li>
					<li id="ca_deliveryno_li">
						<span class="sx_lts f_l">快递单号: </span><span class="sx_rts" style="width:140px;" id="ca_deliveryno"></span><span class="deliverysearch"><a id="deliverysearch" >查询</a></span><span class="hidden" id="ca_deliverytype"></span>
					</li>
				</ul>
			</dd>
		</dl>
	</div>
	<script language="JavaScript">
		$(function(){

			if(1 == {$sitestatus}){
				//重新定义查询事件
				$("#btn_sub").bind("click",function()
				{
					alert("{$indexdesc}"); return false;
				});
			}else{

			//页面表单验证初始化
			$(".verification").Validform({
				tiptype:1,
				btnSubmit:"#btn_sub",
				ajaxPost:true,
				callback:function(data){
					if(data.status==1){
						$.Showmsg(data.info);
						setTimeout(function(){
							$.Hidemsg();

							$("#hiddennumber").val($("#number").val());
							$("#hiddenpassword").val($("#password").val());

							var i = $.layer({
								type : 1,
								title: '收货信息',
								maxmin: true,
								offset:['150px' , ''],
								border : false,
								area : ['520px','492px'],
								shadeClose: false,
								shade : [0.7 , '#000' , true],
								page : {dom : '#address_area'}
							});

						},1000);
					}else if(data.status==2){
						$.Hidemsg();
						//订单查询环节
						$("#ca_order_id").html(data.order_id);
						$("#ca_coupon_name").html(data.coupon_name+'元礼卡');
						$("#ca_name").html(data.name);
						$("#ca_mobile").html(data.mobile);
						$("#ca_province").html(data.province);
						$("#ca_city").html(data.city);
						$("#ca_town").html(data.town);
						$("#ca_address").html(data.address);

						if(data.remark)
							$("#ca_remark").html(data.remark);
						//else
						//	$("#ca_remark_li").hide();

						if(data.userremark)
							$("#ca_userremark").html(data.userremark);
						//else
						//	$("#ca_userremark_li").hide();

						$("#ca_create_time").html(data.create_time);
						$("#ca_status_name").html(data.status_name);

						if(data.deliveryno){
							$("#ca_deliveryno").html(data.deliveryno);
							$("#ca_deliverytype").html(data.deliverytype);
						}
						else
							$("#ca_deliveryno_li").html("<span class='sx_lts f_l'>快递单号: </span><span class='sx_rts' id='ca_deliverno'></span>");

						var i = $.layer({
							type : 1,
							title: '收货信息',
							maxmin: true,
							offset:['150px' , ''],
							border : false,
							area : ['520px','492px'],
							shadeClose: false,
							shade : [0.7 , '#000' , true],
							page : {dom : '#confirm_address_area'}
						});

					}else{
						$.Showmsg(data.info);
					}
				}

			});
			}

			//页面表单验证初始化
			$("#address").Validform({
				tiptype:1,
				ajaxPost:true,
				callback:function(data){
					if(data.status==1){
						layer.closeAll();
						$.Showmsg(data.info);
						setTimeout(function(){
							//$.Hidemsg();
						},2000);
					}else{
						$.Showmsg(data.info);
					}
				}
			});

			//重新定义查询事件
			$("#btn_srh").bind("click",function()
			{
				number = $("#number").val();
				password = $("#password").val();

				$.ajax({
					url:"{:U('Couponorder/search')}",
					data: "ajax=1&number="+number+"&password="+password,
					dataType: "json",
					success: function(data){
						if(data.status)
						{
							if(data.status == 1){
								$.Showmsg(data.info);
							}else{
								$.Hidemsg();
								//订单查询环节
								$("#ca_order_id").html(data.order_id);
								$("#ca_coupon_name").html(data.coupon_name+'元礼卡');
								$("#ca_name").html(data.name);
								$("#ca_mobile").html(data.mobile);
								$("#ca_province").html(data.province);
								$("#ca_city").html(data.city);
								$("#ca_town").html(data.town);
								$("#ca_address").html(data.address);
								$("#ca_create_time").html(data.create_time);
								$("#ca_status_name").html(data.status_name);

								if(data.remark)
									$("#ca_remark").html(data.remark);
								//else
									//$("#ca_remark_li").hide();

								if(data.userremark)
									$("#ca_userremark").html(data.userremark);
								//else
									//$("#ca_userremark_li").hide();

								if(data.deliveryno){
									$("#ca_deliveryno").html(data.deliveryno);
									$("#ca_deliverytype").html(data.deliverytype);
								}else
									$("#ca_deliveryno_li").html("<span class='sx_lts f_l'>快递单号: </span><span class='sx_rts' id='ca_deliverno'></span>");

								var i = $.layer({
									type : 1,
									title: '收货信息',
									maxmin: true,
									offset:['150px' , ''],
									border : false,
									area : ['520px','492px'],
									shadeClose: false,
									shade : [0.7 , '#000' , true],
									page : {dom : '#confirm_address_area'}
								});
							}
						}
						else
						{
							$.Showmsg(data.info);
						}
					},
					error:function(ajaxobj)
					{
						if(ajaxobj.responseText!='')
							alert(ajaxobj.responseText);
					}
				});
			});

			$("#deliverysearch").click(function(){
				var deliveryno=$("#ca_deliveryno").html();
				var deliverytype=$("#ca_deliverytype").html();
				window.open("http://www.kuaidi100.com/chaxun?com="+deliverytype+"&nu="+deliveryno);
				return false;
			});

			$("#qrcode").powerFloat({
				targetMode: "ajax",
				targetAttr: "href",
				hoverFollow: "y",
				position: "6-8"
			});
		});
		function fleshVerify(){
			//重载验证码
			//$('#verifyImg').attr('src',"{:U('Ajax/verify',array('t'=>time()))}");
		}
	</script>
	<div class="footer">
		<p>@江苏大胃王网络科技有限公司 / 江苏优华生态科技有限公司 / 江苏诺亚方舟农业科技有限公司 / 电话：400-100-1561</p>
	</div>
</div>
</body>
</html>